<%@page import="com.bbs.dao.TopicDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

    <%
      int topicId=Integer.valueOf(request.getParameter("topicId"));
   
      TopicDao topicDao=new TopicDao();
      boolean result= topicDao.deleteTopicIdByTopicId(topicId);
      if(result){
    	  
    	   out.print("<script>alert('删除成功!');location.href='../userinfo.jsp'</script>");
      }else{
    	  out.print("<script>alert('删除失败!');location.href='../userinfo.jsp'</script>");
    	  
      }
    
    %>